link_directories(${CMAKE_SOURCE_DIR}/lib)

aux_source_directory(xqw_light XQWL_SRCS)
message("==>>Release Model " ${XQWL_SRCS})
set_source_files_properties(xqw_light/XQWLIGHT.RC
        PROPERTIES
        COMPILE_FLAGS "-D GCC_WINDRES")
file(GLOB_RECURSE FILE_TO_REMOVE "${CMAKE_CURRENT_BINARY_DIR}/**/*.rc.obj")
list (LENGTH FILE_TO_REMOVE length)
if(${length})
    file(REMOVE ${FILE_TO_REMOVE})
endif ()
list(APPEND UI_SRCS xqw_light/XQWLIGHT.RC)
add_executable(xqw_light ${XQWL_SRCS} ${UI_SRCS})
#target_link_options(xqw_light PRIVATE -static-libgcc -static-libstdc++ -mwindows -municode)
target_link_options(xqw_light PRIVATE -static-libgcc -static-libstdc++ -mwindows)
target_link_libraries(xqw_light PRIVATE winmm)


#add_executable(node node.cpp)
#target_link_options(node PRIVATE -static-libgcc -static-libstdc++)
#target_link_options(node PRIVATE -Wl,-Bstatic,--whole-archive -lz -lzstd -lssl -lcrypto -lwinpthread -Wl,--no-whole-archive)
#target_link_libraries(node PUBLIC jsutil)
#
#add_executable(httplib-demo httplib.cpp)
#target_link_options(httplib-demo PRIVATE -static-libgcc -static-libstdc++)
#target_link_libraries(httplib-demo PUBLIC httplib)